

# coding：utf-8
import requests  # 先导入爬虫的库，不然调用不了爬虫的函数
import time
import datetime
import os
import random
import re
import sys
import urllib
import urllib.parse
from urllib.request import quote, unquote
from bs4 import BeautifulSoup


from PyQt5.QtCore import pyqtSignal, QThread


class Browser(QThread):
    label_signal = pyqtSignal(int, int, str)

    def __init__(self, parent=None):
        super(Browser, self).__init__(parent)
        self.list_idx = []

    def run(self):

        print("self.list_idx", self.list_idx)
        leader = 0
        count = 5
        for i in range(count):
            leader = random.randint(0, self.list_idx.__len__() - 1)

            self.label_signal.emit(leader, count - i - 1, "pass")
            # print("i", i)
        self.label_signal.emit(leader, count - i - 1, "end")
